package com.dailyblue.example.springcloud.seata.order.controller;

import com.dailyblue.example.springcloud.commons.util.JsonResult;
import com.dailyblue.example.springcloud.seata.order.bean.Order;
import com.dailyblue.example.springcloud.seata.order.service.OrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/order")
@RestController
public class OrderController {
    @Resource
    private OrderService service;

    @PostMapping
    public JsonResult save(Order order) {
        return service.saveOrder(order);
    }
}
